import matplotlib.pyplot as plt


x = ['a', 'b', 'c', 'd']
y = [10, 14, 5, 40]

plt.axes(aspect = 1)

# autopct='%2.f%%' 显示百分比,explode=[0, 0, 0.2, 0], shadow=True) 选择突出部分
plt.pie(y, labels=x, autopct='%2.f%%', explode=[0, 0, 0.2, 0], shadow=True)

plt.show()
